package com.woniuxy.aspect;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * 环绕通知
 */
public class MyAspect implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        check();
        Object obj=methodInvocation.proceed();
        log();
        return obj;
    }

    public void check(){
        System.out.println("检查权限+++++");
    }
    public void log(){
        System.out.println("日志记录+++++++");
    }
}
